home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / Component.subproj / eTComponent.h < prev    next >
Encoding:
Text File  |  1994-10-30  |  2.3 KB  |  62 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //    FILENAME:    eTComponent.h
  3. //    SUMMARY:    Interface for a generic external-data-container class.
  4. //    SUPERCLASS:    Object
  5. //    INTERFACE:    None
  6. //    PROTOCOLS:    <ComponentData,
  7. //                ETFDSupport,ASCIISupport,HTMDSupport, LaTeXSupport>
  8. //    AUTHOR:        Rohit Khare and Tom Zavisca
  9. //    COPYRIGHT:    (c) 1994 California Institure of Technology, eText Project
  10. ///////////////////////////////////////////////////////////////////////////////
  11. //    DESCRIPTION
  12. //        This is an implementation of the <ComponentData> protocol that works
  13. //    for UNIX files, i.e. data that is copied verbatim from data in the
  14. //     in the filesystem. Subclasses can override default behavior to specify
  15. //    conversions, sharing, and binding conventions for specific data types. 
  16. ///////////////////////////////////////////////////////////////////////////////
  17. //    HISTORY
  18. //    08/06/94:    Added symbolic linking support.
  19. //    07/19/94:    Rewritten/Reorganized as described in Actors/eTComponent.rtf
  20. //    07/10/94:    Created. Final step in evolution towards model-view-controller.
  21. ///////////////////////////////////////////////////////////////////////////////
  22.  
  23. // Note that this file #imports eTImageComponent.h & eTAudioComponent.h at end
  24. #import "eTextKernel.h"
  25.  
  26. @interface eTComponent:Object <ComponentData, ETFDSupport, ASCIISupport, HTMDSupport, LaTeXSupport>
  27. {
  28.     NXAtom    componentName;    //
  29.     NXAtom    currentPath;    //
  30.     BOOL    shouldEdit;        // rename to wantsEdit
  31.     BOOL    isDirty;
  32.     BOOL    isLinked;
  33.     id        etDoc;
  34.     id        icon;
  35. }
  36.  
  37. - initInDoc:newDoc linked: (BOOL) linked;
  38. - readComponentFromPath:(NXAtom)newPath;
  39. - writeComponentToPath:(NXAtom)path inFormat:(int)theFormat;
  40. - linkComponentToPath:(NXAtom)path;
  41. - readComponentFromPboard:(Pasteboard *)thePB;
  42. - writeComponentToPboard: (Pasteboard *)thePB;
  43.  
  44. - (const char *) componentName;
  45. - (const char *) currentPath;
  46. - etDoc;
  47. - icon;
  48. - touch;
  49. - (BOOL) isLinked;
  50. - (BOOL) isMutable;        // this call checks fperms && isMutable
  51. - setShouldEdit:(BOOL) newState;
  52. - setLinked:(BOOL) newState;    // this is only for use in conjunction with
  53.                                 // a readComponent: (see eTImage/chooseImage:)
  54. - setDoc:newDoc;
  55. // "hidden" API extension.
  56. - writeHTML:(NXStream *)stream forView:view andClose:(BOOL)closeIt;
  57. - writeLaTeX:(NXStream *)stream forView:view andClose:(BOOL)closeIt;
  58. @end
  59.  
  60. #import "eTImageComponent.h"
  61. #import "eTAudioComponent.h"
  62.